{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "QUANTAXIS>> start QUANTAXIS\n",
      "QUANTAXIS>> Welcome to QUANTAXIS, the Version is 1.1.0\n",
      "QUANTAXIS>>  \n",
      " ```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      "  ``########`````##````````##``````````##`````````####````````##```##########````````#``````##``````###```##`````######`` \n",
      "  `##``````## ```##````````##`````````####````````##`##```````##```````##```````````###``````##````##`````##```##`````##` \n",
      "  ##````````##```##````````##````````##`##````````##``##``````##```````##``````````####```````#```##``````##```##``````## \n",
      "  ##````````##```##````````##```````##```##```````##```##`````##```````##`````````##`##```````##`##```````##````##``````` \n",
      "  ##````````##```##````````##``````##`````##``````##````##````##```````##````````##``###```````###````````##`````##`````` \n",
      "  ##````````##```##````````##``````##``````##`````##`````##```##```````##```````##````##```````###````````##``````###```` \n",
      "  ##````````##```##````````##`````##````````##````##``````##``##```````##``````##``````##`````##`##```````##````````##``` \n",
      "  ##````````##```##````````##````#############````##```````##`##```````##`````###########`````##``##``````##`````````##`` \n",
      "  ###```````##```##````````##```##```````````##```##```````##`##```````##````##`````````##```##```##``````##```##`````##` \n",
      "  `##``````###````##``````###``##`````````````##``##````````####```````##```##``````````##``###````##`````##````##`````## \n",
      "  ``#########``````########```##``````````````###`##``````````##```````##``##````````````##`##``````##````##`````###``### \n",
      "  ````````#####`````````````````````````````````````````````````````````````````````````````````````````````````````##``  \n",
      "  ``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      "  ``````````````````````````Copyright``yutiansut``2018``````QUANTITATIVE FINANCIAL FRAMEWORK````````````````````````````` \n",
      "  ``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      " ```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      " ```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      " \n"
     ]
    }
   ],
   "source": [
    "import QUANTAXIS as QA"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "AC=QA.QA_Account().from_message(QA.QA_fetch_account()[-1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "pr=QA.QA_Performance(AC)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>datetime</th>\n",
       "      <th>code</th>\n",
       "      <th>price</th>\n",
       "      <th>amount</th>\n",
       "      <th>cash</th>\n",
       "      <th>order_id</th>\n",
       "      <th>realorder_id</th>\n",
       "      <th>trade_id</th>\n",
       "      <th>account_cookie</th>\n",
       "      <th>commission</th>\n",
       "      <th>tax</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018-01-02 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>13.70</td>\n",
       "      <td>1000</td>\n",
       "      <td>986276.0250</td>\n",
       "      <td>Order_hcKjDUL9</td>\n",
       "      <td>Order_hcKjDUL9</td>\n",
       "      <td>Trade_dirnTBmk</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>3.4250</td>\n",
       "      <td>20.550</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2018-01-03 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>13.53</td>\n",
       "      <td>-1000</td>\n",
       "      <td>999829.7025</td>\n",
       "      <td>Order_yDNuvYwp</td>\n",
       "      <td>Order_yDNuvYwp</td>\n",
       "      <td>Trade_M7XC0OtV</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-3.3825</td>\n",
       "      <td>-20.295</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2018-01-04 00:00:00</td>\n",
       "      <td>600000</td>\n",
       "      <td>12.66</td>\n",
       "      <td>1000</td>\n",
       "      <td>987147.5475</td>\n",
       "      <td>Order_79ths54a</td>\n",
       "      <td>Order_79ths54a</td>\n",
       "      <td>Trade_6BmTqekW</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>3.1650</td>\n",
       "      <td>18.990</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2018-01-12 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>13.55</td>\n",
       "      <td>1000</td>\n",
       "      <td>973573.8350</td>\n",
       "      <td>Order_jzDwacS3</td>\n",
       "      <td>Order_jzDwacS3</td>\n",
       "      <td>Trade_0UlX7xmE</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>3.3875</td>\n",
       "      <td>20.325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2018-01-24 00:00:00</td>\n",
       "      <td>000004</td>\n",
       "      <td>22.08</td>\n",
       "      <td>1000</td>\n",
       "      <td>951455.1950</td>\n",
       "      <td>Order_yFp15RQO</td>\n",
       "      <td>Order_yFp15RQO</td>\n",
       "      <td>Trade_ExFuWv6n</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>5.5200</td>\n",
       "      <td>33.120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2018-01-29 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>13.93</td>\n",
       "      <td>-1000</td>\n",
       "      <td>965409.5725</td>\n",
       "      <td>Order_mcG2rbM8</td>\n",
       "      <td>Order_mcG2rbM8</td>\n",
       "      <td>Trade_8AdxzksY</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-3.4825</td>\n",
       "      <td>-20.895</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2018-01-31 00:00:00</td>\n",
       "      <td>000004</td>\n",
       "      <td>20.73</td>\n",
       "      <td>-1000</td>\n",
       "      <td>986175.8500</td>\n",
       "      <td>Order_zvQJ7wgP</td>\n",
       "      <td>Order_zvQJ7wgP</td>\n",
       "      <td>Trade_84RCyXDH</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-5.1825</td>\n",
       "      <td>-31.095</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2018-02-02 00:00:00</td>\n",
       "      <td>600000</td>\n",
       "      <td>13.10</td>\n",
       "      <td>-1000</td>\n",
       "      <td>999298.7750</td>\n",
       "      <td>Order_6A3N2qtD</td>\n",
       "      <td>Order_6A3N2qtD</td>\n",
       "      <td>Trade_ieVF3HtR</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-3.2750</td>\n",
       "      <td>-19.650</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2018-02-05 00:00:00</td>\n",
       "      <td>600000</td>\n",
       "      <td>13.49</td>\n",
       "      <td>1000</td>\n",
       "      <td>985785.1675</td>\n",
       "      <td>Order_kFJrA9mW</td>\n",
       "      <td>Order_kFJrA9mW</td>\n",
       "      <td>Trade_a69NuAIl</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>3.3725</td>\n",
       "      <td>20.235</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2018-02-08 00:00:00</td>\n",
       "      <td>600000</td>\n",
       "      <td>13.18</td>\n",
       "      <td>-1000</td>\n",
       "      <td>998988.2325</td>\n",
       "      <td>Order_I43vO2AP</td>\n",
       "      <td>Order_I43vO2AP</td>\n",
       "      <td>Trade_BfnVHAa8</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-3.2950</td>\n",
       "      <td>-19.770</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2018-02-13 00:00:00</td>\n",
       "      <td>000004</td>\n",
       "      <td>20.10</td>\n",
       "      <td>1000</td>\n",
       "      <td>978853.0575</td>\n",
       "      <td>Order_85yuDf1Y</td>\n",
       "      <td>Order_85yuDf1Y</td>\n",
       "      <td>Trade_xnYstfGk</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>5.0250</td>\n",
       "      <td>30.150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2018-03-08 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>12.11</td>\n",
       "      <td>1000</td>\n",
       "      <td>966721.8650</td>\n",
       "      <td>Order_T8bM1JVw</td>\n",
       "      <td>Order_T8bM1JVw</td>\n",
       "      <td>Trade_M0c2zOQq</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>3.0275</td>\n",
       "      <td>18.165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2018-03-08 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>33.64</td>\n",
       "      <td>1000</td>\n",
       "      <td>933022.9950</td>\n",
       "      <td>Order_5bXrEhfF</td>\n",
       "      <td>Order_5bXrEhfF</td>\n",
       "      <td>Trade_LpiVPJks</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>8.4100</td>\n",
       "      <td>50.460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2018-03-19 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>32.05</td>\n",
       "      <td>-1000</td>\n",
       "      <td>965129.0825</td>\n",
       "      <td>Order_szuKq4RW</td>\n",
       "      <td>Order_szuKq4RW</td>\n",
       "      <td>Trade_Ljmi50Iv</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-8.0125</td>\n",
       "      <td>-48.075</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2018-03-26 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>11.03</td>\n",
       "      <td>-1000</td>\n",
       "      <td>976178.3850</td>\n",
       "      <td>Order_kTPGcie7</td>\n",
       "      <td>Order_kTPGcie7</td>\n",
       "      <td>Trade_n4lYuidL</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-2.7575</td>\n",
       "      <td>-16.545</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2018-03-29 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>34.16</td>\n",
       "      <td>1000</td>\n",
       "      <td>941958.6050</td>\n",
       "      <td>Order_QMo8Ccmu</td>\n",
       "      <td>Order_QMo8Ccmu</td>\n",
       "      <td>Trade_2sObvp0g</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>8.5400</td>\n",
       "      <td>51.240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2018-04-02 00:00:00</td>\n",
       "      <td>000004</td>\n",
       "      <td>22.70</td>\n",
       "      <td>-1000</td>\n",
       "      <td>964698.3300</td>\n",
       "      <td>Order_hM6t4NX2</td>\n",
       "      <td>Order_hM6t4NX2</td>\n",
       "      <td>Trade_nM5p4g8G</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-5.6750</td>\n",
       "      <td>-34.050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2018-04-10 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>11.42</td>\n",
       "      <td>1000</td>\n",
       "      <td>953258.3450</td>\n",
       "      <td>Order_Ee0M6fBx</td>\n",
       "      <td>Order_Ee0M6fBx</td>\n",
       "      <td>Trade_TocKI7vi</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>2.8550</td>\n",
       "      <td>17.130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2018-04-11 00:00:00</td>\n",
       "      <td>600000</td>\n",
       "      <td>11.91</td>\n",
       "      <td>1000</td>\n",
       "      <td>941327.5025</td>\n",
       "      <td>Order_ZXUtRfCs</td>\n",
       "      <td>Order_ZXUtRfCs</td>\n",
       "      <td>Trade_LqCPd7Qm</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>2.9775</td>\n",
       "      <td>17.865</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2018-04-16 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>30.39</td>\n",
       "      <td>-1000</td>\n",
       "      <td>971770.6850</td>\n",
       "      <td>Order_dJSeLpsN</td>\n",
       "      <td>Order_dJSeLpsN</td>\n",
       "      <td>Trade_29M3n4XU</td>\n",
       "      <td>user_admin_macd</td>\n",
       "      <td>-7.5975</td>\n",
       "      <td>-45.585</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               datetime    code  price  amount         cash        order_id  \\\n",
       "0   2018-01-02 00:00:00  000001  13.70    1000  986276.0250  Order_hcKjDUL9   \n",
       "1   2018-01-03 00:00:00  000001  13.53   -1000  999829.7025  Order_yDNuvYwp   \n",
       "2   2018-01-04 00:00:00  600000  12.66    1000  987147.5475  Order_79ths54a   \n",
       "3   2018-01-12 00:00:00  000001  13.55    1000  973573.8350  Order_jzDwacS3   \n",
       "4   2018-01-24 00:00:00  000004  22.08    1000  951455.1950  Order_yFp15RQO   \n",
       "5   2018-01-29 00:00:00  000001  13.93   -1000  965409.5725  Order_mcG2rbM8   \n",
       "6   2018-01-31 00:00:00  000004  20.73   -1000  986175.8500  Order_zvQJ7wgP   \n",
       "7   2018-02-02 00:00:00  600000  13.10   -1000  999298.7750  Order_6A3N2qtD   \n",
       "8   2018-02-05 00:00:00  600000  13.49    1000  985785.1675  Order_kFJrA9mW   \n",
       "9   2018-02-08 00:00:00  600000  13.18   -1000  998988.2325  Order_I43vO2AP   \n",
       "10  2018-02-13 00:00:00  000004  20.10    1000  978853.0575  Order_85yuDf1Y   \n",
       "11  2018-03-08 00:00:00  000001  12.11    1000  966721.8650  Order_T8bM1JVw   \n",
       "12  2018-03-08 00:00:00  000002  33.64    1000  933022.9950  Order_5bXrEhfF   \n",
       "13  2018-03-19 00:00:00  000002  32.05   -1000  965129.0825  Order_szuKq4RW   \n",
       "14  2018-03-26 00:00:00  000001  11.03   -1000  976178.3850  Order_kTPGcie7   \n",
       "15  2018-03-29 00:00:00  000002  34.16    1000  941958.6050  Order_QMo8Ccmu   \n",
       "16  2018-04-02 00:00:00  000004  22.70   -1000  964698.3300  Order_hM6t4NX2   \n",
       "17  2018-04-10 00:00:00  000001  11.42    1000  953258.3450  Order_Ee0M6fBx   \n",
       "18  2018-04-11 00:00:00  600000  11.91    1000  941327.5025  Order_ZXUtRfCs   \n",
       "19  2018-04-16 00:00:00  000002  30.39   -1000  971770.6850  Order_dJSeLpsN   \n",
       "\n",
       "      realorder_id        trade_id   account_cookie  commission     tax  \n",
       "0   Order_hcKjDUL9  Trade_dirnTBmk  user_admin_macd      3.4250  20.550  \n",
       "1   Order_yDNuvYwp  Trade_M7XC0OtV  user_admin_macd     -3.3825 -20.295  \n",
       "2   Order_79ths54a  Trade_6BmTqekW  user_admin_macd      3.1650  18.990  \n",
       "3   Order_jzDwacS3  Trade_0UlX7xmE  user_admin_macd      3.3875  20.325  \n",
       "4   Order_yFp15RQO  Trade_ExFuWv6n  user_admin_macd      5.5200  33.120  \n",
       "5   Order_mcG2rbM8  Trade_8AdxzksY  user_admin_macd     -3.4825 -20.895  \n",
       "6   Order_zvQJ7wgP  Trade_84RCyXDH  user_admin_macd     -5.1825 -31.095  \n",
       "7   Order_6A3N2qtD  Trade_ieVF3HtR  user_admin_macd     -3.2750 -19.650  \n",
       "8   Order_kFJrA9mW  Trade_a69NuAIl  user_admin_macd      3.3725  20.235  \n",
       "9   Order_I43vO2AP  Trade_BfnVHAa8  user_admin_macd     -3.2950 -19.770  \n",
       "10  Order_85yuDf1Y  Trade_xnYstfGk  user_admin_macd      5.0250  30.150  \n",
       "11  Order_T8bM1JVw  Trade_M0c2zOQq  user_admin_macd      3.0275  18.165  \n",
       "12  Order_5bXrEhfF  Trade_LpiVPJks  user_admin_macd      8.4100  50.460  \n",
       "13  Order_szuKq4RW  Trade_Ljmi50Iv  user_admin_macd     -8.0125 -48.075  \n",
       "14  Order_kTPGcie7  Trade_n4lYuidL  user_admin_macd     -2.7575 -16.545  \n",
       "15  Order_QMo8Ccmu  Trade_2sObvp0g  user_admin_macd      8.5400  51.240  \n",
       "16  Order_hM6t4NX2  Trade_nM5p4g8G  user_admin_macd     -5.6750 -34.050  \n",
       "17  Order_Ee0M6fBx  Trade_TocKI7vi  user_admin_macd      2.8550  17.130  \n",
       "18  Order_ZXUtRfCs  Trade_LqCPd7Qm  user_admin_macd      2.9775  17.865  \n",
       "19  Order_dJSeLpsN  Trade_29M3n4XU  user_admin_macd     -7.5975 -45.585  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "AC.history_table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sell_date</th>\n",
       "      <th>buy_date</th>\n",
       "      <th>amount</th>\n",
       "      <th>sell_price</th>\n",
       "      <th>buy_price</th>\n",
       "      <th>pnl_ratio</th>\n",
       "      <th>pnl_money</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>000001</th>\n",
       "      <td>2018-01-03</td>\n",
       "      <td>2018-01-02</td>\n",
       "      <td>1000</td>\n",
       "      <td>13.53</td>\n",
       "      <td>13.70</td>\n",
       "      <td>-0.012409</td>\n",
       "      <td>-170.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000001</th>\n",
       "      <td>2018-01-29</td>\n",
       "      <td>2018-01-12</td>\n",
       "      <td>1000</td>\n",
       "      <td>13.93</td>\n",
       "      <td>13.55</td>\n",
       "      <td>0.028044</td>\n",
       "      <td>380.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000004</th>\n",
       "      <td>2018-01-31</td>\n",
       "      <td>2018-01-24</td>\n",
       "      <td>1000</td>\n",
       "      <td>20.73</td>\n",
       "      <td>22.08</td>\n",
       "      <td>-0.061141</td>\n",
       "      <td>-1350.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>600000</th>\n",
       "      <td>2018-02-02</td>\n",
       "      <td>2018-01-04</td>\n",
       "      <td>1000</td>\n",
       "      <td>13.10</td>\n",
       "      <td>12.66</td>\n",
       "      <td>0.034755</td>\n",
       "      <td>440.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>600000</th>\n",
       "      <td>2018-02-08</td>\n",
       "      <td>2018-02-05</td>\n",
       "      <td>1000</td>\n",
       "      <td>13.18</td>\n",
       "      <td>13.49</td>\n",
       "      <td>-0.022980</td>\n",
       "      <td>-310.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000002</th>\n",
       "      <td>2018-03-19</td>\n",
       "      <td>2018-03-08</td>\n",
       "      <td>1000</td>\n",
       "      <td>32.05</td>\n",
       "      <td>33.64</td>\n",
       "      <td>-0.047265</td>\n",
       "      <td>-1590.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000001</th>\n",
       "      <td>2018-03-26</td>\n",
       "      <td>2018-03-08</td>\n",
       "      <td>1000</td>\n",
       "      <td>11.03</td>\n",
       "      <td>12.11</td>\n",
       "      <td>-0.089182</td>\n",
       "      <td>-1080.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000004</th>\n",
       "      <td>2018-04-02</td>\n",
       "      <td>2018-02-13</td>\n",
       "      <td>1000</td>\n",
       "      <td>22.70</td>\n",
       "      <td>20.10</td>\n",
       "      <td>0.129353</td>\n",
       "      <td>2600.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000002</th>\n",
       "      <td>2018-04-16</td>\n",
       "      <td>2018-03-29</td>\n",
       "      <td>1000</td>\n",
       "      <td>30.39</td>\n",
       "      <td>34.16</td>\n",
       "      <td>-0.110363</td>\n",
       "      <td>-3770.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        sell_date   buy_date  amount  sell_price  buy_price  pnl_ratio  \\\n",
       "code                                                                     \n",
       "000001 2018-01-03 2018-01-02    1000       13.53      13.70  -0.012409   \n",
       "000001 2018-01-29 2018-01-12    1000       13.93      13.55   0.028044   \n",
       "000004 2018-01-31 2018-01-24    1000       20.73      22.08  -0.061141   \n",
       "600000 2018-02-02 2018-01-04    1000       13.10      12.66   0.034755   \n",
       "600000 2018-02-08 2018-02-05    1000       13.18      13.49  -0.022980   \n",
       "000002 2018-03-19 2018-03-08    1000       32.05      33.64  -0.047265   \n",
       "000001 2018-03-26 2018-03-08    1000       11.03      12.11  -0.089182   \n",
       "000004 2018-04-02 2018-02-13    1000       22.70      20.10   0.129353   \n",
       "000002 2018-04-16 2018-03-29    1000       30.39      34.16  -0.110363   \n",
       "\n",
       "        pnl_money  \n",
       "code               \n",
       "000001     -170.0  \n",
       "000001      380.0  \n",
       "000004    -1350.0  \n",
       "600000      440.0  \n",
       "600000     -310.0  \n",
       "000002    -1590.0  \n",
       "000001    -1080.0  \n",
       "000004     2600.0  \n",
       "000002    -3770.0  "
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pr.pnl_fifo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<module 'matplotlib.pyplot' from 'C:\\\\ProgramData\\\\Anaconda3\\\\lib\\\\site-packages\\\\matplotlib\\\\pyplot.py'>"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbEAAAEZCAYAAAAZnxsyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XmcHVWZ//HPN52AjQgJEpZsLBqikUWwZVHcGEgCoskgILgQEQ0gqIyaAZQRBRU1ow44CuKAwggCKgZGwRgU5acjS0cURIzElSQqYZLgQsSQPL8/zrmk0tyE7uTWvVXd3/frVa/cOlU3/dyq6n5unTqLIgIzM7M6GtbpAMzMzDaVk5iZmdWWk5iZmdWWk5iZmdWWk5iZmdWWk5iZmdWWk5iZmdWWk5iZmdWWk5iZmdXW8E4HMNhtv/32seuuu3Y6DDOz2liwYMHDETG6P/s6iZVs1113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ASaSbcg/O2hcAbC/u+kjTpI4BIM+DOJU9L0MrFcTkux+W46hqXlxaf56e4CF7S50RfCMzJr19F6ivxtLy+H+lbS2OK921LC9pxOS7H5bhqGpeX1i4bfSamNFfOGuDxSFOQH0+apfSsSFNsfwH4B2nssGOAP0fEWzb4H7aI43Jcjstx1TUua62NPhOLiEcj4rFYNxbfVODBSCM3A5wB3EhqtbOwXReA43Jcjstx1TUua7H+3K4BXaSEdzOppQ6k6Su2zq+36MRtpONyXI7LcdU1Li+tWfrb2XktMAJ4GNhH0v8A7yZP5RIR/+jn/9NqjstxOS7HVde4rBX6m+1IY4utJTU9PanT2ddxOS7H5bjqHpeXzV8G0tl5HPBG4JMR8dhAk2VZHNfAOK6BcVwD47is3Vo6FYuZmVk7tWNmZzMzs1I4iZmZWW05iZmZWW05iZmZWW05iZmZWW05iZmZWW05iZmZWW39f/d0b5sj/3jWAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pr.plot_pnlmoney(pr.pnl_fifo)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<module 'matplotlib.pyplot' from 'C:\\\\ProgramData\\\\Anaconda3\\\\lib\\\\site-packages\\\\matplotlib\\\\pyplot.py'>"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbEAAAEZCAYAAAAZnxsyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XmYXGWZ/vHvnQUMIiRI2BKWgCGKrE6DIJuiIahoMogYXCY6KKCiMo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hDDpQ8HPgFeSeL37d7ZzuXczmXc9U1l21EbP5Av0YhPJRszvoicB6wS9M6OwBXN70+lryh627l9ZjGz2nVw7mcy7mcq665/Bj+Y7OaEyVtEWUvkvchO54cCzGZnBgSgMh5vB6QdHxZtIqcquHe8v76pp+z2ZzLuZzLueqay0Zmk4uYpNcAt0p6m6TjI+L3kTcfvZWc5G1/SfuUdSeR8xq9XdJ55HiJW8p7LR0v4VzO5VzOVddctgk25fSNHA9xCzl2ZC45VcXhTe/PAN4LvKZp2RjyxqoXAAe047TSuZzLuZyrrrn82LTHsDt2KG850zyYdv+IeHN5fTrwyog4oGn9k8iLoT8D9oqItwzrLxoh53Iu53KuuuayzbfR5kTldOfvBN4paVZZvJa8pREAUWYdlXRq00e/Td437L3kvcRaeurtXM7lXM5V11zWQo90mkaedv+QHPtwCjkT7hHlvSXAS5rWfTY56SOAyBlwF1CmJWjlw7mcy7mcq665/Gjxft7IQXDkgB19MTC/PH8OOVbiUeX1k8hvLY0p3rdtW2jnci7ncq6a5vKjtY9HvCamnCtnHbA2cgryk8lZSs+JnGL7Y8DfyHuHPR/4Q0S8fMgf2CLO5VzO5Vx1zWWt9YjXxCLiLxHxQGy4F98s4N7IOzcDnAksJHvtLOnUAeBczuVczlXXXNZiwzldA8aSBe8GsqcO5PQVW5fnW3TjNNK5nMu5nKuuufxozWO4g53XA+OB3wIHSPov4F8pU7lExN+G+XNazbmcy7mcq665rBWGW+3Ie4utJ7uentLt6utczuVczlX3XH5s/mMkg52nAi8B3hsRD4y0WLaLc42Mc42Mc42Mc1mntXQqFjMzs07qxMzOZmZmbeEiZmZmteUiZmZmteUiZmZmteUiZmZmteUiZmZmteUiZmZmtfX/AYruoWR8TlqdAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pr.plot_pnlratio(pr.pnl_fifo)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
